import java.util.Scanner;

public class Main1628 {
    public static void main(String[] args) {
        Scanner sc =new Scanner(System.in);
        int a=sc.nextInt();
        int b=a/100;
        int c=a%10;
        if (c==b){
            System.out.println("Y");
        }else {
            System.out.println("N");
        }
    }
}
